<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Prex POSIX Compliance</title>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <meta name="keywords" content="Prex, embedded, real-time, operating system, RTOS, open source, free">
  <meta name="author" content="Kohsuke Ohtani">
  <link rel="stylesheet" type="text/css" href="../default.css" media="screen">
  <link rel="stylesheet" type="text/css" href="../print.css" media="print">
</head>
<body>
<div id="top">
</div>
<div id="middle">

<table id="content" cellpadding="0" cellspacing="0">
  <tbody>

    <tr>
      <td id="header" colspan="2" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td id="logo">
            <a href="http://prex.sourceforge.net/">
            <img alt="Prex logo" src="../img/logo.gif" border="0"
            style="width: 250px; height: 54px;"></a>
          </td>
          <td id="brief" align="right" valign="bottom">
            An Open Source, Royalty-free,<br>
	    Real-time Operating System
          </td>
        </tr>
        </table>
      </td>
    </tr>

    <tr>
      <td id="directory" style="vertical-align: top;">
      <a href="http://prex.sourceforge.net/">Prex Home</a> >
      <a href="index.html">Document Index</a> >
      Prex POSIX Compliance
    </tr>
    <tr><td class="pad" colspan="2" style="vertical-align: top;"></td></tr>

    <tr>
      <td id="doc" style="vertical-align: top;">
      <h1>Prex POSIX Compliance</h1>

<i>Version 0.2 (Draft), 2008/08/28</i><br><br>

<br>

<h3>Table of Contents</h3>

<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#api">POSIX APIs</a></li>
</ul>

<h2 id="intro">Introduction</h2>
<p>
In order to reduce the development time of mobilie applications,
Prex is providing developers with POSIX system call interface and
standard C libraries.
</p>

<h2 id="api">POSIX APIs</h2>

<h3>File and Directories - &lt;unistd.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>

<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>

  <tr>
    <td>getcwd</td>
    <td>char *getcwd(char *buf, size_t size);</td>
    <td>get current working directory</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>mkdir</td>
    <td>int mkdir(const char *pathname, mode_t mode);</td>
    <td>create a directory</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>rmdir</td>
    <td>int rmdir(const char *pathname);</td>
    <td>delete a directory</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>chdir</td>
    <td>int chdir(const char *path);</td>
    <td>change working directory</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>link</td>
    <td>int link(const char *oldpath, const char *newpath);</td>
    <td>make a new name for a file</td>
    <td>X</td>
  </tr>

  <tr>
    <td>unlink</td>
    <td>int unlink(const char *pathname);</td>
    <td>delete a name and possibly the file it refers to</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>rename</td>
    <td>int rename(const char *oldpath, const char *newpath);</td>
    <td>change the name or location of a file</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>stat</td>
    <td>int stat(const char *file_name, struct stat *buf);</td>
    <td>get file status</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>chmod</td>
    <td>int chmod(const char *path, mode_t mode);</td>
    <td>change permissions of a file</td>
    <td>X</td>
  </tr>

  <tr>
    <td>chown</td>
    <td>int chown(const char *path, uid_t owner, gid_t group);</td>
    <td>change ownership of a file</td>
    <td>X</td>
  </tr>

  <tr>
    <td>utime</td>
    <td>int utime(const char *filename, struct utimbuf *buf);</td>
    <td>change access and/or modification times of an inode</td>
    <td>X</td>
  </tr>

  <tr>
    <td>opendir</td>
    <td>DIR *opendir(const char *name);</td>
    <td>open a directory</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>readdir</td>
    <td>struct dirent *readdir(DIR *dir);</td>
    <td>read directory entry</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>closedir</td>
    <td>int closedir(DIR *dir);</td>
    <td>close a directory</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>rewinddir</td>
    <td>void rewinddir(DIR *dir);</td>
    <td>reset directory stream</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

</tbody>
</table>


<h3>Advanced File Operations - &lt;unistd.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>

<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>


  <tr>
    <td>access</td>
    <td>int access(const char *pathname, int mode);</td>
    <td>check user's permissions for a file</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>open</td>
    <td>int open(const char *pathname, int flags);</td>
    <td>open and possibly create a file or device</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>creat</td>
    <td>int creat(const char *pathname, mode_t mode);</td>
    <td>open and possibly create a file or device</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>close</td>
    <td>int close(int fd);</td>
    <td>close a file descriptor</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>read</td>
    <td>ssize_t read(int fd, void *buf, size_t count);</td>
    <td>read from a file descriptor</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>write</td>
    <td>ssize_t write(int fd, const void *buf, size_t count);</td>
    <td>write to a file descriptor</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>fcntl</td>
    <td>int fcntl(int fd, int cmd);</td>
    <td>manipulate file descriptor</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>fstat</td>
    <td>int fstat(int filedes, struct stat *buf);</td>
    <td>get file status</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>lseek</td>
    <td>off_t lseek(int fildes, off_t offset, int whence);</td>
    <td>reposition read/write file offset</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>dup</td>
    <td>int dup(int oldfd);</td>
    <td>duplicate a file descriptor</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>dup2</td>
    <td>int dup2(int oldfd, int newfd);</td>
    <td>duplicate a file descriptor</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>pipe</td>
    <td>int pipe(int filedes[2]);</td>
    <td>create pipe</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>mkfifo</td>
    <td>int mkfifo(const char *pathname, mode_t mode);</td>
    <td>make a FIFO special file (a named pipe)</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>umask</td>
    <td>mode_t umask(mode_t mask);</td>
    <td>set file creation mask</td>
    <td>X</td>
  </tr>

  <tr>
    <td>fdopen</td>
    <td>FILE *fdopen(int fildes, const char *mode);</td>
    <td>associate a stream with an existing file descriptor</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>fileno</td>
    <td>int fileno(FILE *stream);</td>
    <td>return file descriptor of stream</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

</tbody>
</table>


<h3>Processes - &lt;unistd.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>

<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>


  <tr>
    <td>fork</td>
    <td>pid_t fork(void);</td>
    <td>create a child process</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>execl</td>
    <td>int execl(const char *path, const char *arg, ...);</td>
    <td>execute a file</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>execle</td>
    <td>int execle(const char *path, const char *arg, ...)</td>
    <td>execute a file</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>execlp</td>
    <td>int execlp(const char *file, const char *arg, ...);</td>
    <td>execute a file</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>execv</td>
    <td>int execv(const char *path, char *const argv[]);</td>
    <td>execute a file</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>execve</td>
    <td>int execve(const char *path, char *const argv[], char *const envp[]))</td>
    <td>execute program</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>execvp</td>
    <td>int execvp(const char *file, char *const argv[]);</td>
    <td>execute a file</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>wait</td>
    <td>pid_t wait(int *status);</td>
    <td>wait for process termination</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>waitpid</td>
    <td>pid_t waitpid(pid_t pid, int *status, int options);</td>
    <td>wait for process termination</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>_exit</td>
    <td>void _exit(int status);</td>
    <td>terminate the current process</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>kill</td>
    <td>int kill(pid_t pid, int sig);</td>
    <td>send signal to a process</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>sleep</td>
    <td>unsigned int sleep(unsigned int seconds);</td>
    <td>Sleep for the specified number of seconds</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>pause</td>
    <td>int pause(void);</td>
    <td>wait for signal</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>alarm</td>
    <td>unsigned int alarm(unsigned int seconds);</td>
    <td>set an alarm clock for delivery of a signal</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>setuid</td>
    <td>int setuid(uid_t uid);</td>
    <td>set user identity</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png">(Limited Support)</td>
  </tr>

  <tr>
    <td>setgid</td>
    <td>int setgid(gid_t gid);</td>
    <td>set group identity</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png">(Limited Support)</td>
  </tr>

</tbody>
</table>


<h3>Long Jumps - &lt;setjmp.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>


<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>

  <tr>
    <td>setjmp</td>
    <td>int setjmp(jmp_buf env);</td>
    <td>save stack context for non-local goto</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>sigsetjmp</td>
    <td>int sigsetjmp(sigjmp_buf env, int savesigs);</td>
    <td>save stack context for non-local goto</td>
    <td>X</td>
  </tr>

  <tr>
    <td>longjmp</td>
    <td>void longjmp(jmp_buf env, int val);</td>
    <td>non-local jump to a saved stack context</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>siglongjmp</td>
    <td>void siglongjmp(sigjmp_buf env, int val);</td>
    <td>non-local jump to a saved stack context</td>
    <td>X</td>
  </tr>

</tbody>
</table>


<h3>Signal Handling - &lt;signal.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>


<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>


  <tr>
    <td>sigaction</td>
    <td>int sigaction(int sig, const struct sigaction *act, struct sigaction *oldact);</td>
    <td>examine and change signal action</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>sigemptyset</td>
    <td>int sigemptyset(sigset_t *set);</td>
    <td>create an empty signal set</td>
    <td>X</td>
  </tr>

  <tr>
    <td>sigfillset</td>
    <td>int sigfillset(sigset_t *set);</td>
    <td>create a full set of signals</td>
    <td>X</td>
  </tr>

  <tr>
    <td>sigaddset</td>
    <td>int sigaddset(sigset_t *set, int signum);</td>
    <td>add a signal to a signal set</td>
    <td>X</td>
  </tr>

  <tr>
    <td>sigdelset</td>
    <td>int sigdelset(sigset_t *set, int signum);</td>
    <td>remove a signal from a signal set</td>
    <td>X</td>
  </tr>

  <tr>
    <td>sigismember</td>
    <td>int sigismember(const sigset_t *set, int signum);</td>
    <td>test a signal set for a selected member</td>
    <td>X</td>
  </tr>

  <tr>
    <td>sigprocmask</td>
    <td>int sigprocmask(int how, const sigset_t *set, sigset_t *oset);</td>
    <td>examine and change blocked signals</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>sigpending</td>
    <td>int sigpending(sigset_t *set);</td>
    <td>examine pending signals</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>sigsuspend</td>
    <td>int sigsuspend(const sigset_t *mask);</td>
    <td>wait for a signal </td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

</tbody>
</table>


<h3>Obtaining Information at Runtime - &lt;unistd.h&gt;&lt;pwd.h&gt;&lt;grp.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>

<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>


  <tr>
    <td>getpid</td>
    <td>pid_t getpid(void);</td>
    <td>get process identification</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>getppid</td>
    <td>pid_t getppid(void);</td>
    <td>get parent process identification</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>getlogin</td>
    <td>char * getlogin(void);</td>
    <td>get user name</td>
    <td>X</td>
  </tr>

  <tr>
    <td>getuid</td>
    <td>uid_t getuid(void);</td>
    <td>get user identity</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png">(Limited Support)</td>
  </tr>

  <tr>
    <td>geteuid</td>
    <td>uid_t geteuid(void);</td>
    <td>get effective user identity</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png">(Limited Support)</td>
  </tr>

  <tr>
    <td>cuserrid</td>
    <td>char * cuserid(char *string);</td>
    <td>get user name</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>getgid</td>
    <td>gid_t getgid(void);</td>
    <td>get group identity</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png">(Limited Support)</td>
  </tr>

  <tr>
    <td>getegid</td>
    <td>gid_t getegid(void);</td>
    <td>get effective group identity</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png">(Limited Support)</td>
  </tr>

  <tr>
    <td>getpwuid</td>
    <td>struct passwd *getpwuid(uid_t uid);</td>
    <td>get password file entry based on user id</td>
    <td>X</td>
  </tr>

  <tr>
    <td>getpwnam</td>
    <td>struct passwd *getpwnam(const char * name);</td>
    <td>get password file entry based on user name</td>
    <td>X</td>
  </tr>

  <tr>
    <td>getgrgid</td>
    <td>struct group *getgrgid(gid_t gid);</td>
    <td>get group file entry based on group id</td>
    <td>X</td>
  </tr>

  <tr>
    <td>getgrnam</td>
    <td>struct group *getgrnam(const char *name);</td>
    <td>get group file entry baes on group name</td>
    <td>X</td>
  </tr>

  <tr>
    <td>getgroups</td>
    <td>int getgroups(int size, gid_t list[]);</td>
    <td>get list of supplementary group IDs</td>
    <td>X</td>
  </tr>

  <tr>
    <td>ctermid</td>
    <td>char *ctermid(char *s);</td>
    <td>get controlling terminal name</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>uname</td>
    <td>int uname(struct utsname *buf);</td>
    <td>get name and information about current kernel</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>getenv</td>
    <td>char *getenv(const char *name);</td>
    <td>get an environment variable</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>sysconf</td>
    <td>long sysconf(int name);</td>
    <td>get configuration information at runtime</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>fpathconf</td>
    <td>long fpathconf(int filedes, int name);</td>
    <td>get configuration values for files</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>isatty</td>
    <td>int isatty(int desc);</td>
    <td>does this descriptor refer to a terminal</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>ttyname</td>
    <td>char *ttyname(int desc);</td>
    <td>return name of a terminal</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>times</td>
    <td>clock_t times(struct tms *buf);</td>
    <td>get process times</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>tzset</td>
    <td>void tzset(void);</td>
    <td>initialize time conversion information </td>
    <td>plan</td>
  </tr>

</tbody>
</table>


<h3>Terminal I/O - &lt;termios.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>

<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>


  <tr>
    <td>getpid</td>
    <td>pid_t getpid(void);</td>
    <td>get process identification</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcgetattr</td>
    <td>int tcgetattr(int fd, struct termios *termios_p);</td>
    <td>get terminal attributes</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcsetattr</td>
    <td>int tcsetattr(int fd, int optional_actions, struct termios *termios_p);</td>
    <td>set terminal attributes</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcdrain</td>
    <td>int tcdrain(int fd);</td>
    <td>wait for all output to be transmitted to the terminal</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcflow</td>
    <td>int tcflow(int fd, int action);</td>
    <td>suspend/restart terminal output</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcflush</td>
    <td>int tcflush(int fd, int queue_selector);</td>
    <td>discard terminal data</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcsendbreak</td>
    <td>int tcsendbreak(int fd, int duration);</td>
    <td>send a break to a terminal</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>cfgetispeed</td>
    <td>speed_t cfgetispeed(struct termios *termios_p);</td>
    <td>get input baud rate</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>cfgetospeed</td>
    <td>speed_t cfgetospeed(struct termios *termios_p);</td>
    <td>get output baud rate</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>cfsetispeed</td>
    <td>int cfsetispeed(struct termios *termios_p, speed_t speed);</td>
    <td>set input baud rate</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>cfsetospeed</td>
    <td>speed_t cfsetospeed(const struct termios *termios_p);</td>
    <td>set output baud rate</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcgetpgrp</td>
    <td>pid_t tcgetpgrp(int fd);</td>
    <td>get terminal foreground process group ID</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>tcsetpgrp</td>
    <td>int tcsetpgrp(int fd, pid_t pgrpid);</td>
    <td>set terminal foreground process group ID</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

</tbody>
</table>


<h3>Process Groups and Job Control - &lt;unistd.h&gt;</h3>

<table border="1" cellspacing="0">
<tbody>

<tr>
  <th width="80">Name</th>
  <th width="400">Synopsis</th>
  <th>Description</th>
  <th width="70">Support?</th>
</tr>


  <tr>
    <td>setsid</td>
    <td>pid_t setsid(void);</td>
    <td>creates a session and sets the process group ID</td>
    <td>plan</td>
  </tr>

  <tr>
    <td>setpgid</td>
    <td>int setpgid(pid_t pid, pid_t pgid);</td>
    <td>set process group</td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

  <tr>
    <td>getpgrp</td>
    <td>pid_t getpgrp(void);</td>
    <td>get process group </td>
    <td><img alt="Yes" height=15 width=20 src="img/checkmark.png"></td>
  </tr>

</tbody>
</table>






      </td>
    </tr>
    <tr>
      <td id="footer" colspan="2" style="vertical-align: top;">
        <a href="http://sourceforge.net">
        <img src="http://sourceforge.net/sflogo.php?group_id=132028&amp;type=1"
        alt="SourceForge.net Logo" border="0" height="31" width="88"></a><br>
        Copyright&copy; 2007 Kohsuke Ohtani
      </td>
    </tr>

  </tbody>
</table>

</div>
<div id="bottom"></div>

</body>
</html>
